
class Solution {
public:
#define MOD 1000000007
    int numWays(int n) {
        if(n < 2){
            return 1;
        }
        int n1 = 1, n2 = 1;
        int num = 2;
        while(n >= 2){
            --n;
            num = (n1 + n2) % MOD;
            n1 = n2;
            n2 = num;
        }
        return num;
    }
};